package com.fivefaces.ide.plugins;

import com.intellij.openapi.diagnostic.Logger;

import java.io.Closeable;
import java.io.IOException;

/**
 * User: abdullahkhan
 * Date: 13/09/12
 * Time: 6:32 PM
 */
public abstract class FileUtils {
    private static final Logger logger = Logger.getInstance(FileUtils.class);

    public static void close(Closeable... closeables) {

        for (Closeable closeable : closeables) {
            try {
                closeable.close();
            } catch (IOException e) {
                logger.error("Failed to close file.", e);
            }
        }
    }
}
